//
//  JBBasicDataViewModuleController.m
//  JustBen
//
//  Created by YongbinZhang on 10/29/13.
//  Copyright (c) 2013 ZhangYongbin(JustBen). All rights reserved.
//

#import "JBBasicDataViewModuleController.h"



@interface JBBasicDataViewModuleController ()

@end


@implementation JBBasicDataViewModuleController

- (id)init
{
    self = [super init];
    if (self) {
        _shouldReload = YES;
        _shouldLoadMore = YES;
        
        _isLoading = NO;
    }
    
    return self;
}



//  模版方法
//  加载数据
- (void)loadData
{
    [self loadDataWithSuccess:nil failure:nil];
}

- (void)loadDataWithSuccess:(void (^)())success failure:(void (^)(NSInteger errorCode, NSString *errorMsg))failure
{
    if (self.isLoading) {
        return;
    } else {
        self.isLoading = YES;
    }
}

- (void)loadDataSuccessedWithData:(id)data
{
    self.isLoading = NO;
}

- (void)loadDataFailed
{
    self.isLoading = NO;
}

@end

